package com.yunxin.core.application.service.impl;


import com.yunxin.core.application.service.PageApplicationGatewayService;
import com.yunxin.core.domain.model.page.PagePopupUserRecord;
import com.yunxin.core.domain.model.page.PagePopupUserRecordRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author zero°
 * @since 2023-12-07
 */
@Service
@RequiredArgsConstructor
public class PageApplicationGatewayServiceImpl implements PageApplicationGatewayService {

    private final PagePopupUserRecordRepository pagePopupUserRecordRepository;

    @Override
    public Boolean savePagePopupUserRecord(String elementCode, String userCode) {
        PagePopupUserRecord pagePopupUserRecord = new PagePopupUserRecord();
        pagePopupUserRecord.setUserCode(userCode);
        pagePopupUserRecord.setElementCode(elementCode);
        return pagePopupUserRecordRepository.savePagePopupUserRecord(pagePopupUserRecord);
    }
}
